class AddFriendRenderer extends eui.ItemRenderer {
    private addFriendsGroup:eui.Group;
    private bigCircleImage:eui.Image;
    private addFriendName:eui.Label;
    private Friends_name:eui.Label;
    private addFrinedImageImage:eui.Image;
    private addFriendsGroup1:eui.Group;
    private bigCircleImage1:eui.Image;
    private addFriendName1:eui.Label;
    private Friends_name1:eui.Label;
    private addFrinedImageImage1:eui.Image;
    private addFriendsGroup2:eui.Group;
    private bigCircleImage2:eui.Image;
    private addFriendName2:eui.Label;
    private Friends_name2:eui.Label;
    private addFrinedImageImage2:eui.Image;
    public constructor(){
        super();
        this.addFriendsGroup=new eui.Group();
        this.bigCircleImage=new eui.Image();
        this.addFriendName=new eui.Label();
        this.Friends_name=new eui.Label();
        this.addFrinedImageImage=new eui.Image();
        this.addFriendsGroup1=new eui.Group();
        this.bigCircleImage1=new eui.Image();
        this.addFriendName1=new eui.Label();
        this.Friends_name1=new eui.Label();
        this.addFrinedImageImage1=new eui.Image();
        this.addFriendsGroup2=new eui.Group();
        this.bigCircleImage2=new eui.Image();
        this.addFriendName2=new eui.Label();
        this.Friends_name2=new eui.Label();
        this.addFrinedImageImage2=new eui.Image();
        
        this.addFriendsGroup.addChild(this.bigCircleImage);
        this.addFriendsGroup.addChild(this.Friends_name);
        this.addFriendsGroup.addChild(this.addFrinedImageImage);
        this.addFriendsGroup.addChild(this.addFriendName);
        this.addFriendsGroup1.addChild(this.bigCircleImage1);
        this.addFriendsGroup1.addChild(this.Friends_name1);
        this.addFriendsGroup1.addChild(this.addFrinedImageImage1);
        this.addFriendsGroup1.addChild(this.addFriendName1);
        this.addFriendsGroup2.addChild(this.bigCircleImage2);
        this.addFriendsGroup2.addChild(this.Friends_name2);
        this.addFriendsGroup2.addChild(this.addFrinedImageImage2);
        this.addFriendsGroup2.addChild(this.addFriendName2);
        this.addChild(this.addFriendsGroup);
        this.addChild(this.addFriendsGroup1);
        this.addChild(this.addFriendsGroup2);
        this.addFriendsGroup.addEventListener(egret.TouchEvent.TOUCH_TAP,this.Onclick,this);
        this.addFriendsGroup1.addEventListener(egret.TouchEvent.TOUCH_TAP,this.Onclick,this);
        this.addFriendsGroup2.addEventListener(egret.TouchEvent.TOUCH_TAP,this.Onclick,this);
    }
    protected dataChanged():void{
        //显示数据中的 label 值
        this.addFriendsGroup.width=696;
        this.addFriendsGroup.height=189;
        this.addFrinedImageImage.x=86;
        this.addFrinedImageImage.y=151;
        this.addFrinedImageImage.source="resource/assets/FriendsWin/添加.png";
        this.addFriendName.fontFamily="FangSong";
        this. addFriendName.size=20;
        this.addFriendName.textColor=0x0C2F59;
        this.addFriendName.x=70;
        this.addFriendName.y=116;
        this.bigCircleImage.source=this.data.head;
        this.bigCircleImage.x=90;
        this.bigCircleImage.y=20
        this.addFriendName.text=this.data.name;

        this.addFrinedImageImage1.x=304;
        this.addFrinedImageImage1.y=151;
        this.addFrinedImageImage1.source="resource/assets/FriendsWin/添加.png";
        this.addFriendName1.fontFamily="FangSong";
        this. addFriendName1.size=20;
        this.addFriendName1.textColor=0x0C2F59;
        this.addFriendName1.x=278;
        this.addFriendName1.y=116;
        this.bigCircleImage1.source=this.data.head1;
        this.bigCircleImage1.x=308;
        this.bigCircleImage1.y=20
        this.addFriendName1.text=this.data.name1;

        this.addFrinedImageImage2.x=522;
        this.addFrinedImageImage2.y=151;
        this.addFrinedImageImage2.source="resource/assets/FriendsWin/添加.png";
        this.addFriendName2.fontFamily="FangSong";
        this. addFriendName2.size=20;
        this.addFriendName2.textColor=0x0C2F59;
        this.addFriendName2.x=500;
        this.addFriendName2.y=116;
        this.bigCircleImage2.source=this.data.head2;
        this.bigCircleImage2.x=526;
        this.bigCircleImage2.y=20
        this.addFriendName2.text=this.data.name2;

         
     
    }
    private Onclick():void{
        SceneManager.instance.addScene(new FriendsHome());
    }
 
}